The Arrival of Layer 2: The Race Begins
Although Ethereum plans to complete the transition to PoS in the second half of 2022, the network will not see any significant TPS improvement any time soon, so it will have to depend on Layer 2 for scaling in the mid-to-long term. In particular, Rollup is a technology of high expectations. At the end of May 2022, Optimism became the first Layer 2 to issue cryptos, which put Layer 2 back on investors’ radar.
Rollup projects are primarily divided into two categories: Optimistic Rollup and zkRollup. Typical Optimistic Rollup projects include Optimism and Arbitrum, while projects such as zkSync and StarkWare focus on the latter category (though zkRollup is not their only focus).
Data from L2BEAT shows that as of June 14, zkSync’s TVL reached $60 million, second only to Arbitrum among projects that have not issued cryptos. As a trustless protocol based on zkRollup, zkSync is used for scaling low-cost transactions on Ethereum.
StarkWare, on the other hand, is divided into licensed StarkEx and Starknet. StarkEx launched its mainnet in June 2021 and has now been upgraded to V4.5, which supports Volition. StarkEx’s TVL stands at over $1 billion, with a total trading volume of $170 million and a cumulative trading volume of $596 billion.
We will illustrate our topic in two articles, which will focus on the differences between zkSync and StarkWare in terms of the underlying Rollup technology, as well as the latest progress of their respective ecosystems.
zkRollup
zkRollup is a Rollup technology that uses validity proofs to scale computation: each batch of transactions comes with a cryptographic proof that is verified by an Ethereum smart contract. zkRollup is so designed that Ethereum-based smart contracts maintain all the funds, while Layer 2 is responsible for performing computation and storage. Here is the basic process of zkRollup: users sign transactions and submit them to validators, who will then roll up thousands of transactions and send the latest root hash to smart contracts on the Ethereum mainnet, with a SNARK or SNARK proof attached to confirm that this new state is indeed generated by applying some correct transactions to the old state.
Compared to other existing Ethereum L2 scaling solutions, zkRollup stands out in terms of security and feasibility. Thanks to the combination of sophisticated cryptography and on-chain data availability, zkRollup is the only L2 scaling solution that doesn’t require any operational activity to keep the funds safe. To be more specific, any zkSync-based transfer of funds relies on purely mathematical validity proof. Meanwhile, as zkSync validators cannot forge the validity proof to destroy the state or steal funds, zkSync does not require third-party online monitoring. Moreover, users can always retrieve the funds from the zkRollup smart contract even if validators stop working. In addition, network congestions of Ethereum do not affect the asset security of zkSync. That avoids the security risk in Optimistic Rollup, which relies on fraud proofs to prevent fraudulent transactions, when the network is heavily congested.
Another advantage of zkRollup is its faster withdrawals when compared with other Rollup solutions. When assets are withdrawn from Layer 2 to Layer 1, thanks to validity proofs, zkRollup does not need to set up a week-long challenge period to prevent fraud. As such, a zkRollup withdrawal takes ten minutes to several hours, and the more withdrawals there are, the faster they will be.
Let’s now turn to zkSync and the flagship projects in its ecosystem.
About zkSync
zkSync, which is based on zkRollup, also relies purely on math to inherit the security of Layer 1. Other scaling solutions, instead, rely on economic guarantees or third parties, and thus offer far weaker security properties. That said, the zero-knowledge technology used by zkRollup remains an infant cryptographic application. Plus, many of the relevant infrastructures are not fully-fledged, and the bar of zkRollup development is high, which is more demanding for developers. In this regard, Matter Labs, the company behind zkSync, is a pioneer in applying zero-knowledge technology on Ethereum and boasts strong R&D capabilities.
In June 2020, zkSync 1.0 was officially launched on the Ethereum mainnet and is primarily used for payments. According to https://l2fees.info/, the transaction cost of zkSync1.0 is about 1/50 of that of the Ethereum mainnet. Running stably for nearly two years, zkSync 1.0 has been adopted by more and more applications. For example, zkSync has been selected as the main payment method for recent Gitcoin donations.
In November 2021, zkSync received $50 million in Series B fundraising, with investments from a strong lineup of institutional investors (e.g. a16z), and plenty of the top institutional investors were chasing after the project.
In February 2022, the zkSync 2.0 public testnet was officially launched, making it the first zkRollup that can execute Ethereum-native smart contracts. To be more specific, this new version supports Solidity 0.8.x and provides a Web3 API that’s fully compatible with Ethereum, allowing developers to easily test and develop smart contracts on zkSync. Additionally, zkSync 2.0 also allows developers to pass data from Ethereum Layer 1 to smart contracts on zkSync, providing the required information to run various smart contracts.
Flagship projects in the zkSync ecosystem
Although zkSync 2.0 has not been officially launched, many applications, including leading DeFi projects such as Curve, are already considering deployment on zkSync. Let’s dive into some of the zkSync-powered projects.
1. Argent: a crypto wallet
Website: https://www.argent.xyz/
Argent is a zkSync-based non-custodial wallet designed to provide ordinary users with the easiest and safest DeFi and Web 3 experience while delivering zkSync-powered payment functions. To make it easier for users to adopt a crypto wallet, Argent enables users to retrieve their account off-chain without having to remember the mnemonic phrases. Based on that, Argent can encrypt a user’s private key and save it in cloud storage, and the key (KEK) to the encrypted private key is stored by Argent. Once a user loses his smartphone and needs to restore the account with a new device, Argent can detect whether his cloud storage contains the encrypted private key, verify his identity through SMS and email, and finally send the KEK to his new device, allowing the user to decrypt the encrypted private key saved in the cloud storage with KEK.
2. ZigZag: a DEX
Website: https://info.zigzag.exchange/
ZigZag, a decentralized non-custodial order book exchange powered by zkRollup, allows users to trade (limit orders/market orders) with negligible fees seamlessly and securely.
3. Orbiter: A cross-chain bridge
Website: https://www.orbiter.finance/
Orbiter Finance is a decentralized cross-rollup Layer 2 bridge that currently supports low-fee, fast token transfers across multiple Layer 2 protocols, including zkSync.
4. Mint Square: an NFT project
Website: https://mintsquare.io/
Mint Square is an NFT platform on Ethereum Layer 2 zkRollup that supports Starknet and zkSync. It aims to onboard the next 100 million people to mint and trade NFT assets.
In the next article, we will go into StarkWare and the projects in its ecosystem, compare them to zkSync, and draw our conclusion.
About StarkWare
StarkWare is building StarkNet, a decentralized, permissionless, censorship-resistant STARK-powered L2 ZK-Rollup that supports general computation over Ethereum. It is based on the Turing-complete Cairo language.
Developers, users, and StarkNet nodes will be able to do everything one would expect from a permissionless L2 Rollup: Developers may build applications implementing their own business logic and deploy them on StarkNet. Users may send transactions to StarkNet to be executed, just like they interact with Ethereum today. StarkNet nodes and participants will be crypto-economically incentivized to ensure the network operates efficiently and fairly.
StarkEx is the first living example of using STARK-based ZK-Rollup to improve application scalability. It is an L2 scalability engine that projects can use to achieve cheap off-chain computation. That is to say, a STARK proof, attesting to the correctness of execution, is generated off-chain. Such proof can include up to 12,000–500,000 transactions (depending on the transaction type). The proof is then sent to the STARK Verifier to be accepted on-chain. This means one verification for all the transactions, with an incredibly low amortized gas cost per transaction. Since June 2020, StarkEx has served multiple clients in such fields as the processing of logically complex transactions (spot, derivatives, and NFTs) and payments, covering DeversiFi, dydx, ImmutableX, and Sorare.
It is noteworthy that StarkWare has started to profit on an ongoing basis without issuing any cryptos. This is inseparable from StarkEx, which provides zkRollup SaaS services. In the future, more DApps and conventional institutions might adopt its customized services.
StarkNet is a permissionless Layer 2 network where any user or developer can deploy Cairo-complied smart contracts. Unlike StarkEx, where applications are responsible for submitting transactions, StarkNet sequencers batch transactions and sends them to be processed and proved. StarkNet supports the Rollup data availability mode, which means that the state of the rollup is written to Ethereum along with the STARK proofs.
StarkNet Alpha was launched on the public testnet in June 2011 and the mainnet in November. At the moment StarkNet is entering Stage 2 where it will focus on performance, throughput, transaction cost, and delay. Moreover, the sequencer will be handed over to the community, and decentralization will be achieved step by step. Additionally, full nodes will allow anyone to save and verify the state of the network locally, enabling users to keep track of exactly what is going on. Three teams, Erigon, Nethermind, and Equilibrium, are developing full nodes.
On May 25, 2022, StarkWare announced a $100-million Series D financing at a valuation of $8 billion. This round was led by Greenoaks Capital and Coatue, with involvement from other existing and new investors that include Tiger Global. After the D round, StarkWare now has raised a total of $262 million.
As of June 12, 2022, the TVL enabled by the StarkEx platform stands at $1 billion, with 184 million transactions, a $615 billion cumulative trading volume, and 58.4 million NFTs minted.
Flagship projects in the StarkWare ecosystem
Apart from the star projects backed by StarkEx, StarkNet has also progressed rapidly. A large number of projects and DApps choose to get deployed on its mainnet while also pursuing zkSync deployment. Let’s go through some Starkware-powered projects.
1. Nethermind: a blockchain infrastructure
Website: https://nethermind.io/
Nethermind.io is a company focusing on offering Ethereum and Layer 2 software solutions. It provides multiple decentralized infrastructure building blocks, covering the Nethermind client (customizable Ethereum client), Warp (an open-source EVM), and the Cairo translator. These enable the direct deployment of the smart contract Voyager on StarkNet. Nethermind.io can easily browse and interact with StarkNet.
2. Braavos: A crypto wallet
Website: https://braavos.app/
Braavos is a self-custodial wallet on StarkNet that allows users to manage their cryptos and NFTs in a user-friendly way. The wallet, available through Firefox and Chrome, has been upgraded to Version 2.0.
3. Aspect (prev. PlayOasis): an NFT marketplace
Website: https://testnet.aspect.co/
Aspect is a StarkNet-based NFT Marketplace currently running on the StarkNet testnet. The project, now at the alpha stage, allows you to create, buy, and sell NFTs. In addition, it is also available in Argent X Wallet and Braavos.
4. Altzone: a metaverse project
Website: https://www.altzone.io/
As a protocol that replaces smart contract interactions with a 3D interface, Altzone integrates with existing protocols to deliver disruptive user experiences. Leveraging the 3D experience, the project conveys many complex, abstract concepts in a simple, visual fashion. Altzone applications include cross-chain bridges, composable DeFi strategies and DEXs, and even disruptive on-chain data visualizations. In terms of products, Altzone boasts a 3D version of the NFT Art Gallery and places for DeFi interactions such as banks and cooperates with JediSwap.
5. Layerswap: a cross-chain bridge
Website: https://www.layerswap.io/
With LayerSwap, users can bridge cryptos from their crypto account directly to a Layer 2 network. They can save up to 10X in fees when transferring cryptos from 8 currently supported CEXs, including Coinbase, Binance, and FTX, to L2 networks like Arbitrum, zkSync, Loopring, Starknet, etc.
6. zkLend: a lending project
Website: https://zklend.com/
zkLend is an L2 money-market protocol combining zkRollup scalability, superior transaction speed, and cost savings with Ethereum’s security. As a gateway for individual/institutional users into DeFi, the project allows permissioned participants to deposit, borrow, and lend assets without compromising compliance and security on StarkNet.
The zkRollup Race: zkSync vs. StarkWare
zkSync and StarkWare are the two major players in the field of zkRollup track. Both are based on zkRollup and have similar architectures for submitting validity proofs. Both have the relevant tech advantages but are slightly different in the specifics.
StarkWare uses STARKs, a cryptographic technology it invented, while zkSync uses SNARKs. The adoption of STARKs means that the system operates without a trust configuration, generating STARKs 10 times faster than SNARKs. On the other hand, STARKs technology is less mature than SNARKs.
As for data availability, zkRollup projects can store transaction data to Ethereum through calldata, allowing transaction records to be found in L1, but the maximum TPS of such data storage method is only around 2,000. That said, users can also choose to store data off-chain to reduce the transaction fee, which increases the TPS by another ten times. Both zkSync and StarkWare provide their own off-chain data storage solutions: zkPorter and Volition.
zkPorter will be kept secure by zkSync stakers via a PoS system. The application is still under development, and once it goes live, zkPorter will offer constant 1-3 cent transaction fees by putting data off-chain.
In terms of EVM support, StarkWare does not natively support EVM and can only translate Solidity into StarkWare’s new language Cairo through a code translator called Warp. Right now, zkSync focuses on supporting the development of smart contracts: it plans to launch an efficient, Turing-complete, SNARK-friendly virtual machine called zkEVM for executing Ethereum-based smart contracts. A zkEVM is a virtual machine that retains EVM semantics but is also ZK-friendly. It executes smart contracts in a way that is compatible with zero-knowledge computations. By the time zkEVMs are available, Ethereum applications can be seamlessly migrated to zkSync.
Conclusion
Despite bearish market conditions, gas fees on Ethereum have significantly dropped compared with the figures recorded in the last bull market. That said, before the next bull market, Ethereum’s L1 performance is unlikely to see any significant improvement. Meanwhile, zkSync and Starkware, two zkRollup-based projects, use zero-knowledge proof and on-chain data availability to ensure the security of users’ cryptos. Plus, their security match that of Ethereum. Additionally, while maintaining sound security performance, zkSync and Starkware offer transaction fees that are fairly lower than Ethereum’s gas fees. As such, zkRollup is likely to become what Vitalik refers to as Ethereum’s primary scaling solution in the mid-to-long term.
As a trending zkRollup project, zkSync prioritizes the user and developer experience and aims to reduce the complexity of the whole platform. Based on its performance recorded during the past few years, Matter Labs, the team behind zkSync, has made steady progress in protocol development. With the zkSync 2.0 upgrade, the ecosystem is thriving. Starkware, on the other hand, accumulated rich experiences in crypto development and ecosystem operations when it was offering StarkEx SaaS services in the early days. This is also how StarkNet achieved rapid development progress. The project is also focusing on the further improvement of performance. At the same time, its commitment to decentralization has become clearer.
In addition, the profit model of Layer 2 will further test the diversity and project quality of the two ecosystems. Meanwhile, zkSync and StarkNet are also competing in terms of technology, ecosystem, and user-friendliness.